Skip to content

Conversation

jaltmayerpizzorno
Copy link

@jaltmayerpizzorno jaltmayerpizzorno commented Oct 8, 2025

Dear TypeEvalPy authors,

Thank you for putting together a benchmark for type inference!

During the process of applying it to our tool, RightTyper, I discovered inconsistencies between the source code and the ground truth files, including discrepancies in column or line annotations, function or variable names, as well as a few incorrect types. These are all corrected in this pull request.

Finally, I also extended Python snippets to execute all ground truth functions, making the benchmark suitable for dynamic type inference tools.

RightTyper types all supported code elements correctly (I verified each of these corrections manually). It doesn't currently support variables, lambdas, or functions that aren't executed. I'll contribute the code to execute RightTyper in a separate pull request.

I attempted to structure the commits to facilitate review. Please let me know if you have any questions!

.. Juan Altmayer Pizzorno, UMass Amherst

… python sources,

  such as incorrect variable names, incorrect or inconsistent position, missing
  function names, etc.;
  type inference on different program elements. The accompanying test
  demonstrates the issue (before the changes, naturally);

- fixed small table formatting issues;
…e, but

  since the decorator overrides 'MyClass', we can still type the variable;
…uth.

  Note that in the case of MyClass.my_method, even calling from within the
  class as 'super().my_method()' or 'cls.my_method(self)' did not lead to
  the original method being invoked; verified with Python 3.12.9 and 3.13.3;
…nference tools;

- aligned non-generated micro-benchmark code with that of the generated one;
…e, but

  since the decorator overrides 'MyClass', we can still type the variable;

- moved Point out of function scope, making it actually available as a type;
  to another bool yields an int, not a bool;
@jaltmayerpizzorno
Copy link
Author

I've now corrected problems in the generation templates.

@jaltmayerpizzorno jaltmayerpizzorno changed the title Fixes bugs in ground truth files and in the mismatch tables emitted in the Fixes bugs in ground truth files (and in the type mismatch finding code) Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant